package com.itheima.mm.mapper;

import com.itheima.mm.pojo.CompanyIndustry;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Description CompanyIndustryMapper
 * @Author xiao
 * @Date 2024-06-27
 */
@Mapper
public interface CompanyIndustryMapper {


    //删除该企业关联的所有行业数据
    @Delete("delete from tr_company_industry where company_id = #{companyId}")
    void deleteByCompanyId(Integer id);


    //重新插入企业关联的单条行业数据
    @Insert("insert into tr_company_industry values(#{companyId},#{industryId})")
    void add(CompanyIndustry companyIndustry);

}
